package com.ruoyi.redtea.dualprevent.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 隐患排查项排查笔记。
可用来查看一个任务实体所挂载的排查项及记录其排查所做的具体内容。
来源于风险辨识下管控措施的排查项内容或者自己添加的。

所有措施下的排查项id在1个表中，故无需多存其它区域之类的字段即可以识别
 * @TableName train_troubleshoot_item_note
 */
@TableName(value ="train_troubleshoot_item_note")
@Data
public class TrainTroubleshootItemNote implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 管控措施下的具体排查内容项的id
     */
    private Integer pointWaysAvatarId;

    /**
     * 排查结果 1.正常  2.异常
     */
    private Integer resultStatus;

    /**
     * 排查反馈描述
     */
    private String feedbackDesc;

    /**
     * 整改类型 0.暂不整改 1.立即整改 2.限时整改
     */
    private Integer reformType;

    /**
     * 计划所创建的任务实体id，用于关联任务状态
     */
    private Integer taskId;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 
     */
    private Integer isdel;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TrainTroubleshootItemNote other = (TrainTroubleshootItemNote) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPointWaysAvatarId() == null ? other.getPointWaysAvatarId() == null : this.getPointWaysAvatarId().equals(other.getPointWaysAvatarId()))
            && (this.getResultStatus() == null ? other.getResultStatus() == null : this.getResultStatus().equals(other.getResultStatus()))
            && (this.getFeedbackDesc() == null ? other.getFeedbackDesc() == null : this.getFeedbackDesc().equals(other.getFeedbackDesc()))
            && (this.getReformType() == null ? other.getReformType() == null : this.getReformType().equals(other.getReformType()))
            && (this.getTaskId() == null ? other.getTaskId() == null : this.getTaskId().equals(other.getTaskId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsdel() == null ? other.getIsdel() == null : this.getIsdel().equals(other.getIsdel()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPointWaysAvatarId() == null) ? 0 : getPointWaysAvatarId().hashCode());
        result = prime * result + ((getResultStatus() == null) ? 0 : getResultStatus().hashCode());
        result = prime * result + ((getFeedbackDesc() == null) ? 0 : getFeedbackDesc().hashCode());
        result = prime * result + ((getReformType() == null) ? 0 : getReformType().hashCode());
        result = prime * result + ((getTaskId() == null) ? 0 : getTaskId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsdel() == null) ? 0 : getIsdel().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pointWaysAvatarId=").append(pointWaysAvatarId);
        sb.append(", resultStatus=").append(resultStatus);
        sb.append(", feedbackDesc=").append(feedbackDesc);
        sb.append(", reformType=").append(reformType);
        sb.append(", taskId=").append(taskId);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isdel=").append(isdel);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}